/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/




#if !defined(AFX_PGLBRUSH_H__9B9FDFB1_D9C6_49AD_BE58_326AE1A4284D__INCLUDED_)
#define AFX_PGLBRUSH_H__9B9FDFB1_D9C6_49AD_BE58_326AE1A4284D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CPGLArchive;
class CPGLBrush;
PGL_DECLARE_SMARTPTR( CPGLBrush );

/*!
	\defgroup PGLBrushGroup Brushes
\ingroup PGLCoreGroup
*/

/*! \brief Abstract brush

  \ingroup PGLBrushGroup
*/
class PGLCORE_EXT_CLASS CPGLBrush : public CPGLNode
{
	PGL_DECLARE_DYNCREATE(CPGLBrush);
public:
	//! \name Constructors
	//@{
	//! Default constructor
	CPGLBrush(const CPGLRectD& rBBox = CPGLRectD::GetNormBox());
	//! Copy constructor
	CPGLBrush(const CPGLBrush& brush)	{*this = brush;};
	//! Assignement constructor
	CPGLBrush& operator = (const CPGLBrush& brush);
	virtual ~CPGLBrush();
	//@}

	//! \name Main plot function
	//@{
	//! Make the brush current in gfx. This function must be override in child classes
	virtual void MakeCurrentFill(gfxinterface::CGfxInterface& gfx){};
	//@}

	//! \name Bounding box
	//@{
	//! Returns brush bounding box
	CPGLRectD& GetBBox()										{	return m_rBBox;};
	//! Returns brush bounding box, const
	const CPGLRectD& GetBBox() const							{	return m_rBBox;};
	//! Sets the brush bounding box
	void SetBBox(const CPGLRectD& rBBox)						{	m_rBBox = rBBox;};
	//@}

	//! \name Serialization and debugging
	//@{
	//! Serialize functions
	virtual void SerializeXML( CPGLArchive& ar);

	//! Debuggin functions
	#ifdef _DEBUG
	    virtual void Dump( CDumpContext& dc ) const;
	    virtual void AssertValid() const;  
	#endif
	//@}

protected:
	//! \name Attributes
	//@{
	//! bouding box
	CPGLRectD m_rBBox;
	//@}

};

#endif // !defined(AFX_PGLBRUSH_H__9B9FDFB1_D9C6_49AD_BE58_326AE1A4284D__INCLUDED_)
